<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
          div {
            display: flex;
            width: 600px;
            height: 400px;
            background-color: pink;
            /* flex布局中默认的子元素是不换行的 如果装不开 会缩子元素的宽度 在放到父元素里面 */
            /* 默认值：不换行 */
            /* flex-wrap: nowrap; */
            /* 换行显示 */
            flex-wrap: wrap;
          }
          span {
            width: 150px;
            height: 100px;
            background-color: skyblue;
            margin: 10px;
           }
    </style>
</head>
<body>
    <div>
        <span>1</span>
        <span>1</span>
        <span>1</span>
        <span>1</span>
    </div>
</body>
</html>